#pragma once

#include <iostream>
#include <string>

class Logger
{

public:
	const int LogLevelWarnning = 1;
	const int LogLevelError = 0;
	const int LogLevelInfo = 2;
private:
	int m_LogLevel = LogLevelInfo;

public:
	Logger();
	~Logger();

	void SetLevel(int);
	void Error(const char*);
	void Info(const char*);
	void Warn(const char*);
	 
};

Logger::Logger() {}
Logger::~Logger() {}

inline
void Logger::SetLevel(int level)
{
	m_LogLevel = level;
}

inline
void Logger::Error(const char* message)
{
	if(m_LogLevel >= LogLevelError)
		std::cout << "[ERROR]:" << message << std::endl;
}
inline
void Logger::Info(const char* message)
{
	if (m_LogLevel >= LogLevelWarnning)
		std::cout << "[INFO]:" << message << std::endl;
}

inline
void Logger::Warn(const char* message)
{
	if (m_LogLevel >= LogLevelInfo)
		std::cout << "[WARNNING]:" << message << std::endl;
}
 

//================================================


int RunExample020()
{
	Logger logger;
	logger.SetLevel(logger.LogLevelError);
	logger.Warn("WA");

	return 0;
}